<template>
  <el-tabs v-model="data.value" @tab-click="handleClick">
    <el-tab-pane
      v-for="(item,index) in data.children"
      :label="item.label"
      :name="item.value"
      :key="index"
    >
      <el-scrollbar>
        <div class="p16">
          <template v-if="$scopedSlots[item.value]">
            <slot :name="item.value"/>
          </template>
          <template v-else>
            <p>【{{item.label}}】暂无信息</p>
          </template>
        </div>
      </el-scrollbar>
    </el-tab-pane>
  </el-tabs>
</template>
<script>
export default {
  name: "TabsBox",
  props: {
    data:{
      type:Object,
    },
  }, // 获取父组件数据
  components: {

  },
  created() {

  },
  data() {
    return {

    };
  },
  methods: {
    handleClick(val){

    },
  },
  computed: {

  }
};
</script>
<style  lang="scss" scoped>

</style>
